//测试代码
cc.Class({
    extends: cc.Component,

    properties: {

    },
    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {
        var xhr = new XMLHttpRequest();
        
        
        
        let a = cc.loader.load({url: url, type: 'png'},(err, texture2D) => this.imgLoaded(err,texture2D))

    },
    imgLoaded(err,texture2D) {
        this.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture2D,cc.Rect(texture2D.width,texture2D.height))
    }

    // update (dt) {},
});
